Yet more -Wall chatter from Ubuntu.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 17 Feb 2014 20:36:17 +0000 (20:36 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 17 Feb 2014 20:36:17 +0000 (20:36 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4750 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/exif.cc
gpsbabel/gopal.cc
gpsbabel/magproto.cc
gpsbabel/mapsource.cc
gpsbabel/pcx.cc

index 56875e88e4a419e2b518c64766de1e32137f780f..fbb47313159e0362f5c289bb07bdc490426ca8bc 100644 (file)
@@ -452,9 +452,12 @@ exif_read_ifd(exif_app_t* app, const uint16_t ifd_nr, gbsize_t offs,
 
   for (i = 0; i < ifd->count; i++) {
     exif_tag_t* tag;
-    offs = gbftell(fin);
 
     tag = (exif_tag_t*) xcalloc(sizeof(*tag), 1);
+#ifdef EXIF_DBG
+    tag->offs = offs;
+    offs = gbftell(fin);
+#endif
 
     ENQUEUE_TAIL(&ifd->tags, &tag->Q);
 
@@ -463,9 +466,6 @@ exif_read_ifd(exif_app_t* app, const uint16_t ifd_nr, gbsize_t offs,
     tag->count = gbfgetuint32(fin);
     tag->size = exif_type_size(tag->type) * tag->count;
     tag->data = &tag->value;
-#ifdef EXIF_DBG
-    tag->offs = offs;
-#endif
 
     if (BYTE_TYPE(tag->type) && (tag->count <= 4)) {
       gbfread(tag->data, 4, 1, fin);
index 0d42558c40ebda7208472a1879ba26c6e3f7a2ea..e8ce026e0c9393b21c2f5c0f5239488e112a9e8e 100644 (file)
@@ -176,10 +176,9 @@ gopal_read(void)
   int fix, hms;
   route_head* route;
   Waypoint* wpt, *lastwpt=NULL;
-  double long_old,lat_old;
+  double lat_old;
   char tbuffer[64];
   struct tm tm2;
-  long_old=0;
   lat_old=0;
   strftime(routename,sizeof(routename),"Tracklog %c",gmtime(&tx));
 
@@ -306,7 +305,6 @@ gopal_read(void)
 
     if ((wpt->fix != fix_none)&&(lat_old==0)) { //first-time init
       lat_old=wpt->latitude;
-      long_old=wpt->longitude;
       //route_add_wpt(route, wpt);
       lastwpt=wpt;
     }
@@ -330,7 +328,6 @@ gopal_read(void)
         fprintf(stderr,"valid                line %5lu: \"%s\" %lf km/h\n",line,buff,speed);
       }
       lastwpt=wpt;
-      long_old=wpt->longitude;
       lat_old=wpt->latitude;
       route_add_wpt(route,wpt);
       waypt_add(new Waypoint(*wpt));
index 103c6eba1a04fd2262540ce872d080ec30ee9c92..32bfc27d938cee5dfb3c3fb9853c9033043ecce5 100644 (file)
@@ -340,7 +340,7 @@ mag_writeack(int osum)
     return;
   }
 
-  i = sprintf(nbuf, "PMGNCSM,%02X", osum);
+  (void) sprintf(nbuf, "PMGNCSM,%02X", osum);
   nsum = mag_checksum(nbuf);
   i = sprintf(obuf, "$%s*%02X\r\n",nbuf, nsum);
 
@@ -1176,13 +1176,11 @@ mag_rteparse(char* rtemsg)
 QString
 mag_find_descr_from_token(const char* token)
 {
-  icon_mapping_t* i = icon_mapping;
-
   if (icon_mapping == NULL) {
     return "unknown";
   }
 
-  for (i = icon_mapping; i->token; i++) {
+  for (icon_mapping_t* i = icon_mapping; i->token; i++) {
     if (token[0] == 0) {
       break;
     }
index e2bfb9916a7d9bb2436704367fcd2dcf2c0ee02e..f052790cbb8cfba61aec175db0d4e15602262d99 100644 (file)
@@ -1830,7 +1830,7 @@ mps_write(void)
   route_head*          rte;
   route_head*          trk;
 
-  char                 recType;
+  char                 recType = -1;
   int                          reclen;
   /* TODO: This kills a compiler warning but I'm not sure it's right */
   int                          reclen2 = 0;
index 9152b43ccd91063e5620ad574ffb69e03768bbc5..a2cdb7cd16f1ef96c52c40518b84c7fffd67a4f7 100644 (file)
@@ -291,7 +291,7 @@ data_read(void)
       char* i = ibuf;
       sym_col = 0;
 
-      for (col = 0, i = ibuf; *i; col++, i++) {
+      for (col = 0; *i; col++, i++) {
         if (0 == case_ignore_strncmp(i, "comment", 7)) {
           comment_col = col;
         }